<template>
  <div>

    <div style="width: 1500px;float: left;margin-top: 30px">
      <div style="float: left;color: blueviolet">借款信息认证</div>
      <div style="margin-top: 30px;">
        <el-steps :active="active"  finish-status="success">
          <el-step title="填写借款信息"></el-step>
          <el-step title="提交平台审核"></el-step>
          <el-step title="等待认证结果"></el-step>
        </el-steps>
      </div>

    </div>

    <div style="float: left;margin-top: 25px;width: 1500px;background: beige;margin-left: 60px" v-if="fag && 1==1">
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item label="借款金额">
          <el-input style="float: left" v-model="formInline.price" placeholder="请填写借款金额">
          </el-input>
        </el-form-item><br>
        <el-form-item label="借款期数">
          <el-select v-model="formInline.loanperiods" placeholder="请选择">
            <el-option
                v-for="item in options3"
                :key="item.value"
                :label="item.label"
                :value="item.label">
            </el-option>
          </el-select>
        </el-form-item><br>
        <el-form-item label="还款方式">
          <el-select v-model="formInline.repaymentType" placeholder="请选择还款方式">
            <el-option
                v-for="item in options4"
                :key="item.value"
                :label="item.label"
                :value="item.label">
            </el-option>
          </el-select>
        </el-form-item><br>
        <el-form-item label="资金用途">
          <el-input v-model="formInline.purpose" placeholder="请填写资金用途"></el-input>
        </el-form-item><br>
        <el-form-item label="年利率">
          <el-input  v-model="formInline.annual" placeholder="请填写年利率%">
          </el-input>

        </el-form-item><br>
      </el-form>
      <el-button id="b1" style="margin-top: 12px;width: 200px;height: 50px;border-radius: 25px;
    background: chocolate;margin-left: 0px;color: white;font-size: 18px" @click="next">提交</el-button>
    </div>

    <!--提交生审批-->
    <div v-if="fag2" style="width: 1500px;margin-top: 100px;float: left">
      <h1 style="color: chocolate">您已提交成功,待审核通过我们会议短信通知,请耐心等待!!</h1>
      <a href="">点击跳转到个人中心</a>
    </div>





  </div>
</template>

<script>
export default {
  data() {
    return {
      Information:{

      },
      logo: require('@/assets/2323.png'),
      fag:true,
      fag2:false,
      active: 0,
      options3: [{
        value: '选项1',
        label: '1个月'
      }, {
        value: '选项2',
        label: '3个月'
      }, {
        value: '选项3',
        label: '6个月'
      }, {
        value: '选项41',
        label: '9个月'
      },
        {
          value: '选项4',
          label: '12个月'
        }],
      options4: [{
        value: '选项1',
        label: '等额本息'
      }, {
        value: '选项2',
        label: '等额本金'
      }, {
        value: '选项3',
        label: '每月还息一次还本'
      }, {
        value: '选项41',
        label: '一次还本还息'
      }],
      value: '',
      formInline: {
        productId:this.$route.query.productId,
        infoStatus:'',
        infoId:this.$route.query.infoId,
        userId:1
      }
    };
  },
  created() {
  },

  methods: {
    next() {
      console.log(this.formInline)
      if (this.active++ > 2) this.active = 0;
      this.fag=false,
      this.fag2=true
      //添加个人数据
      this.$http.post("/borrower/save",this.formInline).then( res=>{
        console.log(res.data)
      })
    },
    onSubmit() {
      console.log('submit!');
    }
  }
}
</script>

<style scoped>

</style>
